3.1.53 \(\int \frac {(a+a \sec (e+f x))^{3/2}}{c-c \sec (e+f x)} \, dx\) [53]

Optimal. Leaf size=70 \[ \frac {2 a^{3/2} \text {ArcTan}\left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{c f}+\frac {4 a \cot (e+f x) \sqrt {a+a \sec (e+f x)}}{c f} \]

[Out]

2*a^(3/2)*arctan(a^(1/2)*tan(f*x+e)/(a+a*sec(f*x+e))^(1/2))/c/f+4*a*cot(f*x+e)*(a+a*sec(f*x+e))^(1/2)/c/f

________________________________________________________________________________________

Rubi [A]
time = 0.11, antiderivative size = 70, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3989, 3972, 464, 209} \begin {gather*} \frac {2 a^{3/2} \text {ArcTan}\left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a \sec (e+f x)+a}}\right )}{c f}+\frac {4 a \cot (e+f x) \sqrt {a \sec (e+f x)+a}}{c f} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + a*Sec[e + f*x])^(3/2)/(c - c*Sec[e + f*x]),x]

[Out]

(2*a^(3/2)*ArcTan[(Sqrt[a]*Tan[e + f*x])/Sqrt[a + a*Sec[e + f*x]]])/(c*f) + (4*a*Cot[e + f*x]*Sqrt[a + a*Sec[e
 + f*x]])/(c*f)

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 464

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[c*(e*x)^(m +
 1)*((a + b*x^n)^(p + 1)/(a*e*(m + 1))), x] + Dist[(a*d*(m + 1) - b*c*(m + n*(p + 1) + 1))/(a*e^n*(m + 1)), In
t[(e*x)^(m + n)*(a + b*x^n)^p, x], x] /; FreeQ[{a, b, c, d, e, p}, x] && NeQ[b*c - a*d, 0] && (IntegerQ[n] ||
GtQ[e, 0]) && ((GtQ[n, 0] && LtQ[m, -1]) || (LtQ[n, 0] && GtQ[m + n, -1])) &&  !ILtQ[p, -1]

Rule 3972

Int[cot[(c_.) + (d_.)*(x_)]^(m_.)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n_.), x_Symbol] :> Dist[-2*(a^(m/2 +
 n + 1/2)/d), Subst[Int[x^m*((2 + a*x^2)^(m/2 + n - 1/2)/(1 + a*x^2)), x], x, Cot[c + d*x]/Sqrt[a + b*Csc[c +
d*x]]], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0] && IntegerQ[m/2] && IntegerQ[n - 1/2]

Rule 3989

Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.)*(csc[(e_.) + (f_.)*(x_)]*(d_.) + (c_))^(n_.), x_Symbol] :> Di
st[((-a)*c)^m, Int[Cot[e + f*x]^(2*m)*(c + d*Csc[e + f*x])^(n - m), x], x] /; FreeQ[{a, b, c, d, e, f, n}, x]
&& EqQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && IntegerQ[m] && RationalQ[n] &&  !(IntegerQ[n] && GtQ[m - n, 0])

Rubi steps

\begin {align*} \int \frac {(a+a \sec (e+f x))^{3/2}}{c-c \sec (e+f x)} \, dx &=-\frac {\int \cot ^2(e+f x) (a+a \sec (e+f x))^{5/2} \, dx}{a c}\\ &=\frac {(2 a) \text {Subst}\left (\int \frac {2+a x^2}{x^2 \left (1+a x^2\right )} \, dx,x,-\frac {\tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{c f}\\ &=\frac {4 a \cot (e+f x) \sqrt {a+a \sec (e+f x)}}{c f}-\frac {\left (2 a^2\right ) \text {Subst}\left (\int \frac {1}{1+a x^2} \, dx,x,-\frac {\tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{c f}\\ &=\frac {2 a^{3/2} \tan ^{-1}\left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{c f}+\frac {4 a \cot (e+f x) \sqrt {a+a \sec (e+f x)}}{c f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.60, size = 93, normalized size = 1.33 \begin {gather*} \frac {2 a^2 \left (-\text {ArcTan}\left (\sqrt {-1+\sec (e+f x)}\right ) (-1+\cos (e+f x))+2 \cos (e+f x) \sqrt {-1+\sec (e+f x)}\right ) \sec (e+f x) \tan (e+f x)}{c f (-1+\sec (e+f x))^{3/2} \sqrt {a (1+\sec (e+f x))}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + a*Sec[e + f*x])^(3/2)/(c - c*Sec[e + f*x]),x]

[Out]

(2*a^2*(-(ArcTan[Sqrt[-1 + Sec[e + f*x]]]*(-1 + Cos[e + f*x])) + 2*Cos[e + f*x]*Sqrt[-1 + Sec[e + f*x]])*Sec[e
 + f*x]*Tan[e + f*x])/(c*f*(-1 + Sec[e + f*x])^(3/2)*Sqrt[a*(1 + Sec[e + f*x])])

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(193\) vs. \(2(62)=124\).
time = 0.18, size = 194, normalized size = 2.77

method result size
default \(-\frac {\sqrt {\frac {a \left (\cos \left (f x +e \right )+1\right )}{\cos \left (f x +e \right )}}\, \left (\left (\cos ^{2}\left (f x +e \right )\right ) \sqrt {2}\, \sqrt {-\frac {2 \cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \sin \left (f x +e \right ) \sqrt {2}}{2 \cos \left (f x +e \right )}\right )-\sqrt {2}\, \sqrt {-\frac {2 \cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \sin \left (f x +e \right ) \sqrt {2}}{2 \cos \left (f x +e \right )}\right )+4 \cos \left (f x +e \right ) \sin \left (f x +e \right )\right ) a}{c f \left (\cos ^{2}\left (f x +e \right )-1\right )}\) \(194\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+a*sec(f*x+e))^(3/2)/(c-c*sec(f*x+e)),x,method=_RETURNVERBOSE)

[Out]

-1/c/f*(a*(cos(f*x+e)+1)/cos(f*x+e))^(1/2)*(cos(f*x+e)^2*2^(1/2)*(-2*cos(f*x+e)/(cos(f*x+e)+1))^(1/2)*arctanh(
1/2*(-2*cos(f*x+e)/(cos(f*x+e)+1))^(1/2)*sin(f*x+e)/cos(f*x+e)*2^(1/2))-2^(1/2)*(-2*cos(f*x+e)/(cos(f*x+e)+1))
^(1/2)*arctanh(1/2*(-2*cos(f*x+e)/(cos(f*x+e)+1))^(1/2)*sin(f*x+e)/cos(f*x+e)*2^(1/2))+4*cos(f*x+e)*sin(f*x+e)
)/(cos(f*x+e)^2-1)*a

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sec(f*x+e))^(3/2)/(c-c*sec(f*x+e)),x, algorithm="maxima")

[Out]

-integrate((a*sec(f*x + e) + a)^(3/2)/(c*sec(f*x + e) - c), x)

________________________________________________________________________________________

Fricas [A]
time = 4.12, size = 293, normalized size = 4.19 \begin {gather*} \left [\frac {\sqrt {-a} a \log \left (-\frac {8 \, a \cos \left (f x + e\right )^{3} - 4 \, {\left (2 \, \cos \left (f x + e\right )^{2} - \cos \left (f x + e\right )\right )} \sqrt {-a} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sin \left (f x + e\right ) - 7 \, a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right ) + 1}\right ) \sin \left (f x + e\right ) + 8 \, a \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right )}{2 \, c f \sin \left (f x + e\right )}, \frac {a^{\frac {3}{2}} \arctan \left (\frac {2 \, \sqrt {a} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right ) \sin \left (f x + e\right )}{2 \, a \cos \left (f x + e\right )^{2} + a \cos \left (f x + e\right ) - a}\right ) \sin \left (f x + e\right ) + 4 \, a \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right )}{c f \sin \left (f x + e\right )}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sec(f*x+e))^(3/2)/(c-c*sec(f*x+e)),x, algorithm="fricas")

[Out]

[1/2*(sqrt(-a)*a*log(-(8*a*cos(f*x + e)^3 - 4*(2*cos(f*x + e)^2 - cos(f*x + e))*sqrt(-a)*sqrt((a*cos(f*x + e)
+ a)/cos(f*x + e))*sin(f*x + e) - 7*a*cos(f*x + e) + a)/(cos(f*x + e) + 1))*sin(f*x + e) + 8*a*sqrt((a*cos(f*x
 + e) + a)/cos(f*x + e))*cos(f*x + e))/(c*f*sin(f*x + e)), (a^(3/2)*arctan(2*sqrt(a)*sqrt((a*cos(f*x + e) + a)
/cos(f*x + e))*cos(f*x + e)*sin(f*x + e)/(2*a*cos(f*x + e)^2 + a*cos(f*x + e) - a))*sin(f*x + e) + 4*a*sqrt((a
*cos(f*x + e) + a)/cos(f*x + e))*cos(f*x + e))/(c*f*sin(f*x + e))]

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - \frac {\int \frac {a \sqrt {a \sec {\left (e + f x \right )} + a}}{\sec {\left (e + f x \right )} - 1}\, dx + \int \frac {a \sqrt {a \sec {\left (e + f x \right )} + a} \sec {\left (e + f x \right )}}{\sec {\left (e + f x \right )} - 1}\, dx}{c} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sec(f*x+e))**(3/2)/(c-c*sec(f*x+e)),x)

[Out]

-(Integral(a*sqrt(a*sec(e + f*x) + a)/(sec(e + f*x) - 1), x) + Integral(a*sqrt(a*sec(e + f*x) + a)*sec(e + f*x
)/(sec(e + f*x) - 1), x))/c

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 198 vs. \(2 (62) = 124\).
time = 1.16, size = 198, normalized size = 2.83 \begin {gather*} -\frac {\sqrt {2} \sqrt {-a} a^{3} {\left (\frac {\sqrt {2} \log \left (\frac {{\left | 2 \, {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + a}\right )}^{2} - 4 \, \sqrt {2} {\left | a \right |} - 6 \, a \right |}}{{\left | 2 \, {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + a}\right )}^{2} + 4 \, \sqrt {2} {\left | a \right |} - 6 \, a \right |}}\right )}{a c {\left | a \right |}} + \frac {8}{{\left ({\left (\sqrt {-a} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + a}\right )}^{2} - a\right )} a c}\right )} \mathrm {sgn}\left (\cos \left (f x + e\right )\right )}{2 \, f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sec(f*x+e))^(3/2)/(c-c*sec(f*x+e)),x, algorithm="giac")

[Out]

-1/2*sqrt(2)*sqrt(-a)*a^3*(sqrt(2)*log(abs(2*(sqrt(-a)*tan(1/2*f*x + 1/2*e) - sqrt(-a*tan(1/2*f*x + 1/2*e)^2 +
 a))^2 - 4*sqrt(2)*abs(a) - 6*a)/abs(2*(sqrt(-a)*tan(1/2*f*x + 1/2*e) - sqrt(-a*tan(1/2*f*x + 1/2*e)^2 + a))^2
 + 4*sqrt(2)*abs(a) - 6*a))/(a*c*abs(a)) + 8/(((sqrt(-a)*tan(1/2*f*x + 1/2*e) - sqrt(-a*tan(1/2*f*x + 1/2*e)^2
 + a))^2 - a)*a*c))*sgn(cos(f*x + e))/f

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\left (a+\frac {a}{\cos \left (e+f\,x\right )}\right )}^{3/2}}{c-\frac {c}{\cos \left (e+f\,x\right )}} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + a/cos(e + f*x))^(3/2)/(c - c/cos(e + f*x)),x)

[Out]

int((a + a/cos(e + f*x))^(3/2)/(c - c/cos(e + f*x)), x)

________________________________________________________________________________________